//
//  NSObject+LNG.swift
//  HanYuanSchool
//
//  Created by sun on 2022/7/26.
//  Copyright © 2022 hanyuan. All rights reserved.
//

import Foundation

public extension NSObject {
    // MARK:返回className
    var ClassName:String {
        get {
            let name = type(of: self).description()
            if name.contains(".") {
                return name.components(separatedBy: ".")[1]
            } else {
                return name
            }
        }
    }
    
    var ClassNameAndNameSpace: String {
        get {
            let pageName:String = NSStringFromClass(type(of: self))
            return pageName
        }
    }
}
